package com.fuce.xiaoai.Util;

import com.fuce.xiaoai.model.returns.Response;
import com.fuce.xiaoai.model.returns.ReturnJson;
import com.fuce.xiaoai.model.returns.ToSpeak;

/**
 * 小爱返回调用方法
 * @author Administrator
 *
 */
public  class AiRturnUtil {
	
	/**
	 * 返回文字 
	 * @param text 文字内容
	 * @param is_session_end 是否断开连接
	 * @param Open_mic 是否打开麦克风
	 * @return
	 */
	public static ReturnJson setText(String text,Boolean is_session_end,Boolean Open_mic) {
		ReturnJson returnJson=new ReturnJson();
		returnJson.setVersion("1.0");
		//发送文字后是否退出
		returnJson.setIs_session_end(is_session_end);
		
		Response response=new Response();
		ToSpeak toSpeak=new ToSpeak();
		toSpeak.setType(0);
		toSpeak.setText(text);
		response.setOpen_mic(Open_mic);
		response.setTo_speak(toSpeak);
		returnJson.setResponse(response);
		return returnJson;
	}
	
}
